#include <graphics.h>
#include <conio.h>
#include <stdlib.h>
#include <dos.h>
#include <alloc.h>
#include <bios.h>

#define BAS_SIZE 15
#define D 4

#define BOO 1
#define DRAW 0

void draw_bas(int x,int y,int bc)
{
	if(bc==BOO)	{
		setfillstyle(SOLID_FILL,0);
		bar(x-BAS_SIZE,y-BAS_SIZE,x+BAS_SIZE,y+BAS_SIZE);
		return;
	}
	bar(x-BAS_SIZE,y-BAS_SIZE,x+BAS_SIZE,y+BAS_SIZE);
	setfillstyle(INTERLEAVE_FILL,6);
	bar(x-BAS_SIZE,y-BAS_SIZE,x+BAS_SIZE,y+BAS_SIZE);
	setfillstyle(INTERLEAVE_FILL,2);
	bar(x-(BAS_SIZE-D),y-(BAS_SIZE-D),x+(BAS_SIZE-D),y+(BAS_SIZE-D));
}

int bx=320,by=240;

#define NORTH 0
#define EAST 1
#define SOUTH 2
#define WEST 3


void step(int dir)
{
	draw_bas(bx,by,BOO);
	switch(dir)	{
		case NORTH:	by--;
		break;
		case EAST:	bx++;
		break;
		case SOUTH:	by++;
		break;
		case WEST:	bx--;
	}
	draw_bas(bx,by,DRAW);
}

void main()
{
	int d,gdriver=DETECT,gmode;
	initgraph(&gdriver,&gmode,"");
	while(!kbhit())	{

	}
}